<?php
namespace app\index\logic;

class LoginLogic extends BaseLogic {

    /**
     * 更新用户手机号码
     * @param $openid
     * @param $tel
     * @return mixed
     */
    public function save_user_tel($openid,$tel){
        $u_data = [];
        $u_data['tel'] = $tel;

        $maps = [];
        $maps[] = ['openid','=',$openid];
        $r = model('user')->force()->save($u_data,$maps);
        if($r !== false){
            return $this->get_response(1,'添加成功');
        }
        return $this->get_response(0,'添加失败');
    }
}